//
//  messageVC.m
//  小钱钱
//
//  Created by sdzhqy on 2017/3/20.
//  Copyright © 2017年 sdzhqy. All rights reserved.
//

#import "messageVC.h"
#import "messageModel.h"
#import "messageCell.h"
#import "common.h"
#import <UIView+SDAutoLayout.h>
#import <UITableView+SDAutoTableViewCellHeight.h>
@interface messageVC ()<UITableViewDelegate,UITableViewDataSource>
{
    UITableView *tab;

}

@end

@implementation messageVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.navigationItem.title=@"消息";
    self.view.backgroundColor=[UIColor yellowColor];
    [self createtab];
}
-(void)createtab
{
    tab=[[UITableView alloc]init];
    tab.frame=CGRectMake(0, 0, kScreenWidth, kScreenHeight);
    tab.delegate=self;
    tab.dataSource=self;
    
    tab.backgroundColor=[UIColor whiteColor];
    [self.view addSubview:tab];
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 10;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
//       return [tab cellHeightForIndexPath:indexPath model:self.newlistArray[indexPath.row] keyPath:@"model"];
    return 200;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *ID=@"haha";
    messageCell *cell=[tableView dequeueReusableCellWithIdentifier:ID];
    if (!cell) {
        cell = [[messageCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:ID];
    }
 // cell.model=self.newlistArray[indexPath.row];
    return cell;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    [tableView deselectRowAtIndexPath:indexPath animated:NO];//点击不变色
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
